home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / cd-sup / importanti / abackup / install / install_abackup < prev    next >
Text File  |  1998-05-24  |  16KB  |  411 lines

  1. ;
  2. ; Installer script for ABackup installation
  3. ; $VER: Install_ABackup v36.3 (18.1.97)
  4. ;
  5. ;********* Initialisations ****************************************************
  6. ;
  7. (set MainDir            "")
  8. (set PrefDir            "")
  9. (set DefPrefDir         "SYS:Prefs")
  10. (set SourceDir          "/")
  11. (set XPKSourceDir       (tackon SourceDir "libs/compressors"))
  12. (set TmpFile            (cat "T:RunABPrefs_" (database "total-mem")))
  13. ;
  14. ;********* Setup all the messages *********************************************
  15. ;
  16. (procedure SetupMessages (
  17.   (set DefHelpDir       (tackon "HELP:" @language))
  18.   (set DefCatalogDir    (tackon "LOCALE:Catalogs" @language))
  19.  
  20.   (if (= @language "english")
  21.     (
  22.       (set #InstallWhat         "What do you want to install ?")
  23.       (set #InstallChoice1      "Main program")
  24.       (set #InstallChoice1b     "Programme principal - 68060 version")
  25.       (set #InstallChoice2      "Preferences program")
  26.       (set #InstallChoice3      "Online help")
  27.       (set #InstallChoice4      "XPK libraries")
  28.       (set #InstallChoice5      "")
  29.       (set #SelectMainDir       "Select the directory where to copy the Main program.")
  30.       (set #CopyingMainProg     "Copying the Main program...")
  31.       (set #SelectPrefDir       "Select the directory where to copy the Prefs program.")
  32.       (set #BadPrefDir          "Sorry, the Main program and the Prefs program can't be installed in the same directory !")
  33.       (set #CopyingPrefProg     "Copying the Prefs program...")
  34.       (set #UpdateMainTT1       "Updating the %s tooltype of the Main program...")
  35.       (set #UpdateMainTT2       "Don't forget to update the %s tooltype of the Main program.")
  36.       (set #UpdateMainTTH1      "This will allow the Main program to call the Prefs program.")
  37.       (set #UpdateMainTTH2      "This will allow the Main program to find the help file.")
  38.       (set #UpdatePrefTT1       "Updating the %s tooltype of the Prefs program...")
  39.       (set #UpdatePrefTT2       "Don't forget to update the %s tooltype of the Prefs program.")
  40.       (set #UpdatePrefTTH2      "This will allow the Prefs program to find the help file.")
  41.       (set #SelectHelpDir       "Select the directory where to copy online help.")
  42.       (set #CopyingHelp         "Copying online help...")
  43.       (set #SelectXPKDir        "Select the directory where to copy XPK libraries.")
  44.       (set #CopyingXPK          "Copying XPK libraries...")
  45.       (set #SelectCatalogDir    "Select the directory where to copy the catalog file.")
  46.       (set #CopyingCatalog      "Copying catalog file...")
  47.       (set #RunPrefProg         "Run the Pref program.")
  48.       (set #RunPrefHelp         "This will allow you to setup the ABackup Preferences.")
  49.       (set #Shareware1          "ABackup is a SHAREWARE program !")
  50.       (set #Shareware2          "If you like it and use it, a contribution of US $20 is asked.")
  51.       (set #Shareware3          "Please read the 'Diffusion' section of the documentation, for more details")
  52.     )
  53.   )
  54.   (if (= @language "français")
  55.     (
  56.       (set #InstallWhat         "Que voulez-vous installer ?")
  57.       (set #InstallChoice1      "Programme principal")
  58.       (set #InstallChoice1b     "Programme principal - Version 68060")
  59.       (set #InstallChoice2      "Programme de paramétrage")
  60.       (set #InstallChoice3      "Aide en ligne")
  61.       (set #InstallChoice4      "Bibliothèques XPK")
  62.       (set #InstallChoice5      "Catalogue")
  63.       (set #SelectMainDir       "Indiquez dans quel répertoire installer le programme principal.")
  64.       (set #CopyingMainProg     "Copie du programme principal...")
  65.       (set #SelectPrefDir       "Indiquez dans quel répertoire installer le programme de paramétrage.")
  66.       (set #BadPrefDir          "Désolé, le programme principal et le programme de paramétrage ne peuvent être installés dans le même répertoire !")
  67.       (set #CopyingPrefProg     "Copie du programme de paramétrage...")
  68.       (set #UpdateMainTT1       "Mise à jour du type d'outil %s du programme principal...")
  69.       (set #UpdateMainTT2       "N'oubliez pas de mettre à jour le type d'outil %s du programme principal.")
  70.       (set #UpdateMainTTH1      "Ceci permettra au programme principal d'appeller le programme de paramétrage.")
  71.       (set #UpdateMainTTH2      "Ceci permettra au programme principal de trouver le fichier d'aide.")
  72.       (set #UpdatePrefTT1       "Mise à jour du type d'outil %s du programme de paramétrage...")
  73.       (set #UpdatePrefTT2       "N'oubliez pas de mettre à jour le type d'outil %s du programme de paramétrage.")
  74.       (set #UpdatePrefTTH2      "Ceci permettra au programme de paramétrage de trouver le fichier d'aide.")
  75.       (set #SelectHelpDir       "Indiquez dans quel répertoire installer les fichiers d'aide.")
  76.       (set #CopyingHelp         "Copie des fichiers d'aide...")
  77.       (set #SelectXPKDir        "Indiquez dans quel répertoire installer les bibliothèques XPK.")
  78.       (set #CopyingXPK          "Copie des bibliothèques XPK...")
  79.       (set #SelectCatalogDir    "Indiquez dans quel répertoire installer le fichier catalogue.")
  80.       (set #CopyingCatalog      "Copie du fichier catalogue...")
  81.       (set #RunPrefProg         "Appel du programme de paramétrage.")
  82.       (set #RunPrefHelp         "Ceci vous permettra de paramétrer ABackup.")
  83.       (set #Shareware1          "ABackup est un programme SHAREWARE !")
  84.       (set #Shareware2          "Si vous l'utilisez et l'appréciez, une contribution de 100 FF est demandée.")
  85.       (set #Shareware3          "Reportez-vous au chapitre 'Diffusion' de la documentation, pour plus de détails.")
  86.     )
  87.   )
  88.   (if (= @language "deutsch")
  89.     (
  90.       (set #InstallWhat         "Was möchten Sie installieren ?")
  91.       (set #InstallChoice1      "Hauptprogramm")
  92.       (set #InstallChoice1b     "Hauptprogramm - für 68060")
  93.       (set #InstallChoice2      "Voreinstellungsprogramm")
  94.       (set #InstallChoice3      "Online Hilfe")
  95.       (set #InstallChoice4      "XPK Libraries")
  96.       (set #InstallChoice5      "Katalog")
  97.       (set #SelectMainDir       "Wählen Sie das Verzeichnis für das Hauptprogramm.")
  98.       (set #CopyingMainProg     "Kopiere das Hauptprogramm...")
  99.       (set #SelectPrefDir       "Wählen Sie das Verzeichnis für das Voreinstellungsprogramm.")
  100.       (set #BadPrefDir          "Sorry, Hauptprogramm und Voreinstellungsprogramm dürfen nicht in das selbe Verzeichnis !")
  101.       (set #CopyingPrefProg     "Kopiere das Voreinstellungsprogramm...")
  102.       (set #UpdateMainTT1       "Aktualisiere das %s Merkmal des Hauptprogramms...")
  103.       (set #UpdateMainTT2       "Vergessen Sie nicht das %s Merkmal des Hauptprogramms zu aktualisieren.")
  104.       (set #UpdateMainTTH1      "Dies erlaubt dem Hauptprogramm den Aufruf des Voreinstellungsprogramms.")
  105.       (set #UpdateMainTTH2      "Dies erlaubt dem Hauptprogramm die Hilfe-Datei zu finden.")
  106.       (set #UpdatePrefTT1       "Aktualisiere das %s Merkmal des Voreinstellungsprogramms...")
  107.       (set #UpdatePrefTT2       "Vergessen Sie nicht das %s Merkmal des Voreinstellungsprogramms zu aktualisieren.")
  108.       (set #UpdatePrefTTH2      "Dies erlaubt dem Voreinstellungsprogramm die Hilfe-Datei zu finden.")
  109.       (set #SelectHelpDir       "Wählen Sie das Verzeichnis für die Online-Hilfe.")
  110.       (set #CopyingHelp         "Kopiere die Datei für die Online-Hilfe...")
  111.       (set #SelectXPKDir        "Wählen Sie das Verzeichnis für die XPK Libraries.")
  112.       (set #CopyingXPK          "Kopiere die XPK Libraries...")
  113.       (set #SelectCatalogDir    "Wählen Sie das Verzeichnis für die Katalogdatei.")
  114.       (set #CopyingCatalog      "Kopiere die Katalogdatei...")
  115.       (set #RunPrefProg         "Starte das Voreinstellungsprogramm.")
  116.       (set #RunPrefHelp         "Dies erlaubt Ihnen die Voreinstellungen von ABackup zu ändern.")
  117.       (set #Shareware1          "ABackup ist SHAREWARE !")
  118.       (set #Shareware2          "Falls ihnen das Programm gefällt und Sie es regelmäßig benutzen, entrichten Sie bitte eine Gebühr von DM 30.")
  119.       (set #Shareware3          "Schlagen Sie bitte im Kapitel 'Diffusion' (Vertrieb) des Handbuchs nach, um mehr Informationen zu erhalten.")
  120.     )
  121.   )
  122.   (if (= @language "italiano")
  123.     (
  124.       (set #InstallWhat         "Che cosa vuoi installare ?")
  125.       (set #InstallChoice1      "Programma Principale")
  126.       (set #InstallChoice1b     "Programma Principale - 68060 version")
  127.       (set #InstallChoice2      "Programma Preferenze")
  128.       (set #InstallChoice3      "Aiuto in-linea")
  129.       (set #InstallChoice4      "Librerie XPK")
  130.       (set #InstallChoice5      "Catalogo Italiano")
  131.       (set #SelectMainDir       "Seleziona la directory dove copiare il Programma Principale.")
  132.       (set #CopyingMainProg     "Sto copiando il Programma Principale...")
  133.       (set #SelectPrefDir       "Seleziona la directory dove copiare il Programma Preferenze.")
  134.       (set #BadPrefDir          "Spiacente, ma il programma Principale e quello delle Preferenze non possono essere installati nella stessa directory !")
  135.       (set #CopyingPrefProg     "Sto copiando il programma per le Preferenze...")
  136.       (set #UpdateMainTT1       "Sto aggiornando il tooltype %s del programma Principale...")
  137.       (set #UpdateMainTT2       "Non dimenticare di aggiornare il tooltype %s del programma Principale.")
  138.       (set #UpdateMainTTH1      "Questo permetterà al programma Principale di chiamare il programma Preferenze.")
  139.       (set #UpdateMainTTH2      "Questo permetterà al programma Principale di trovare il file di aiuto.")
  140.       (set #UpdatePrefTT1       "Sto aggiornando il tooltype %s del programma Preferenze...")
  141.       (set #UpdatePrefTT2       "Non dimenticare di aggiornare il tooltype %s del programma Preferenze.")
  142.       (set #UpdatePrefTTH2      "Questo permetterà al programma Preferenze di trovare il file di aiuto.")
  143.       (set #SelectHelpDir       "Seleziona la directory dove copiare l'aiuto in-linea.")
  144.       (set #CopyingHelp         "Sto copiando aiuto in-linea...")
  145.       (set #SelectXPKDir        "Seleziona la directory dove copiare librerie XPK.")
  146.       (set #CopyingXPK          "Sto copiando librerie XPK...")
  147.       (set #SelectCatalogDir    "Seleziona la directory dove copiare il file catalogo.")
  148.       (set #CopyingCatalog      "Sto copiando il file catalogo...")
  149.       (set #RunPrefProg         "Eseguo il programma per le Preferenze.")
  150.       (set #RunPrefHelp         "Questo ti permette di impostare le Preferenze di ABackup.")
  151.       (set #Shareware1          "ABackup è un programma SHAREWARE !")
  152.       (set #Shareware2          "Se ti piace e lo usi, è richiesto un contributo di US $20.")
  153.       (set #Shareware3          "Per favore, leggi la sezione 'Diffusione' della documentazione, per ulteriori dettagli")
  154.     )
  155.   )
  156. ))
  157. ;
  158. ;********* Install the main program *******************************************
  159. ;
  160. (procedure InstallMainProg (
  161.   (set MainDir
  162.     (askdir
  163.       (prompt #SelectMainDir)
  164.       (help @askdir-help)
  165.       (default "SYS:Utilities")
  166.     )
  167.   )
  168.   (copyfiles
  169.     (prompt #CopyingMainprog)
  170.     (help @copyfiles-help)
  171.     (source (tackon SourceDir ProgName))
  172.     (dest MainDir)
  173.     (newname "ABackup")
  174.     (infos)
  175.   )
  176. ))
  177. ;
  178. ;********* Install the Prefs program *******************************************
  179. ;
  180. (procedure InstallPrefProg (
  181.   (set PrefDir MainDir)
  182.   (until (NOT (= PrefDir MainDir)) (
  183.     (set PrefDir
  184.       (askdir
  185.     (prompt #SelectPrefDir)
  186.     (help @askdir-help)
  187.     (default DefPrefDir)
  188.       )
  189.     )
  190.     (if (= PrefDir MainDir) (message #BadPrefDir))
  191.   ))
  192.   (copyfiles
  193.     (prompt #CopyingPrefprog)
  194.     (help @copyfiles-help)
  195.     (source (tackon SourceDir "Prefs/ABackup"))
  196.     (dest PrefDir)
  197.     (infos)
  198.   )
  199.   (if (NOT (= PrefDir DefPrefDir))
  200.     (if (BITAND ToInstall 1)
  201.       (tooltype
  202.     (prompt (#UpdateMainTT1 "PREFSPATH"))
  203.     (help #UpdateMainTTH1)
  204.     (dest (tackon MainDir "ABackup"))
  205.     (settooltype "PREFSPATH" PrefDir)
  206.     (confirm)
  207.       )
  208.       (message (cat (#UpdateMainTT2 "PREFSPATH") #UpdateMainTTH1))
  209.     )
  210.   )
  211. ))
  212. ;
  213. ;********* Install the help files **********************************************
  214. ;
  215. (procedure InstallHelp (
  216.   (set HelpDir
  217.     (askdir
  218.       (prompt #SelectHelpDir)
  219.       (help @askdir-help)
  220.       (default DefHelpDir)
  221.     )
  222.   )
  223.  
  224.   (if (= @language "français")
  225.       (set SrcHelpDir "français")
  226.       (set SrcHelpDir "english")
  227.   )
  228.  
  229.   (copyfiles
  230.     (prompt #CopyingHelp)
  231.     (help @copyfiles-help)
  232.     (source (tackon (tackon SourceDir (tackon "ABackup/Docs/" SrcHelpDir)) "ABackup.guide"))
  233.     (dest HelpDir)
  234.   )
  235.   (if (NOT (= HelpDir DefHelpDir))
  236.     (if (BITAND ToInstall 1)
  237.       (tooltype
  238.     (prompt (#UpdateMainTT1 "HELPPPATH"))
  239.     (help #UpdateMainTTH2)
  240.     (dest (tackon MainDir "ABackup"))
  241.     (settooltype "HELPPATH" HelpDir)
  242.     (confirm)
  243.       )
  244.       (message (cat (#UpdateMainTT2 "HELPPPATH") #UpdateMainTTH2))
  245.     )
  246.   )
  247.  
  248.   (copyfiles
  249.     (prompt #CopyingHelp)
  250.     (help @copyfiles-help)
  251.     (source (tackon (tackon SourceDir (tackon "Prefs/Docs/" SrcHelpDir)) "ABackupPrefs.guide"))
  252.     (dest HelpDir)
  253.   )
  254.   (if (NOT (= HelpDir DefHelpDir))
  255.     (if (BITAND ToInstall 2)
  256.       (tooltype
  257.     (prompt (#UpdatePrefTT1 "HELPPPATH"))
  258.     (help #UpdatePrefTTH2)
  259.     (dest (tackon PrefDir "ABackup"))
  260.     (settooltype "HELPPATH" HelpDir)
  261.     (confirm)
  262.       )
  263.       (message (cat (#UpdatePrefTT2 "HELPPPATH") #UpdatePrefTTH2))
  264.     )
  265.   )
  266. ))
  267. ;
  268. ;********* Install XPK library ************************************************
  269. ;
  270. (procedure InstallXPK (
  271.   (set XPKDir
  272.     (askdir
  273.       (prompt #SelectXPKDir)
  274.       (help @askdir-help)
  275.       (default "LIBS:")
  276.     )
  277.   )
  278.   (copylib
  279.     (prompt #CopyingXPK)
  280.     (help @copylib-help)
  281.     (source (tackon SourceDir "libs/xpkmaster.library"))
  282.     (dest XPKDir)
  283.   )
  284.   (foreach XPKSourceDir "#?.library"
  285.     (copylib
  286.       (prompt #CopyingXPK)
  287.       (help @copylib-help)
  288.       (source (tackon XPKSourceDir @each-name))
  289.       (dest (tackon XPKDir "compressors"))
  290.     )
  291.   )
  292. ))
  293. ;
  294. ;********* Install the catalogs ***********************************************
  295. ;
  296. (procedure InstallCatalog (
  297.   (set CatalogDir
  298.     (askdir
  299.       (prompt #SelectCatalogDir)
  300.       (help @askdir-help)
  301.       (default DefCatalogDir)
  302.     )
  303.   )
  304.   (copyfiles
  305.     (prompt #CopyingCatalog)
  306.     (help @copyfiles-help)
  307.     (source (tackon (tackon (tackon SourceDir "ABackup/Catalogs") @language) "abackup.catalog"))
  308.     (dest CatalogDir)
  309.   )
  310.   (copyfiles
  311.     (prompt #CopyingCatalog)
  312.     (help @copyfiles-help)
  313.     (source (tackon (tackon (tackon SourceDir "Prefs/Catalogs") @language) "abackupprefs.catalog"))
  314.     (dest CatalogDir)
  315.   )
  316. ))
  317. ;
  318. ;********* Start of the installation program **********************************
  319. ;
  320. (complete 0)
  321. (user 2)
  322. (set #InstallWhat "")
  323. ;
  324. ;********* Setup messages and check language
  325. ;
  326. (SetupMessages)
  327. (if (= #InstallWhat "")
  328.   (
  329.     (set langnum
  330.       (askchoice
  331.     (prompt "Which language do you speak ?")
  332.     (help @askoptions-help)
  333.     (choices "deutsch" "english" "français" "italiano")
  334.       )
  335.     )
  336.     (set @language (select langnum "deutsch" "english" "français" "italiano"))
  337.     (SetupMessages)
  338.   )
  339. )
  340. ;
  341. ;********* Displays the welcome message
  342. ;
  343. (user 0)
  344. (welcome)
  345. ;
  346. ;********* Ask which part is to be installed
  347. ;
  348. (set ToInstall
  349.   (askoptions
  350.     (prompt #InstallWhat)
  351.     (help @askoptions-help)
  352.     (if (= #InstallChoice5 "")
  353.     (choices #InstallChoice1 #InstallChoice1b #InstallChoice2 #InstallChoice3 #InstallChoice4)
  354.     (choices #InstallChoice1 #InstallChoice1b #InstallChoice2 #InstallChoice3 #InstallChoice4 #InstallChoice5)
  355.     )
  356.   )
  357. )
  358. ;
  359. ;******** Install each part
  360. ;
  361. (complete 15)
  362. (if (BITAND ToInstall  1)
  363.   (
  364.     (set ProgName "ABackup/ABackup")
  365.     (InstallMainProg)
  366.   )
  367. )
  368. (if (BITAND ToInstall  2)
  369.   (
  370.     (set ProgName "ABackup/ABackup_060")
  371.     (InstallMainProg)
  372.   )
  373. )
  374. (complete 30)
  375. (if (BITAND ToInstall  4) (InstallPrefProg))
  376. (complete 45)
  377. (if (BITAND ToInstall  8) (InstallHelp))
  378. (complete 60)
  379. (if (BITAND ToInstall 16) (InstallXPK))
  380. (complete 75)
  381. (if (BITAND ToInstall 32) (InstallCatalog))
  382. (complete 90)
  383. ;
  384. ;******** Call the Pref program
  385. ;
  386. (if (BITAND ToInstall  4)
  387.   (
  388.     (textfile
  389.       (dest TmpFile)
  390.       (append (cat "Run <NIL: >NIL: " (tackon PrefDir "ABackup")))
  391.     )
  392.     (execute
  393.       (TmpFile)
  394.       (prompt #RunPrefProg)
  395.       (help #RunPrefHelp)
  396.       (confirm)
  397.     )
  398.     (delete TmpFile)
  399.   )
  400. )
  401. ;
  402. ;******** End
  403. ;
  404. (if (= MainDir "")
  405.   (set @default-dest PrefDir)
  406.   (set @default-dest MainDir)
  407. )
  408. (message (cat #Shareware1 "\n" #Shareware2 "\n" #Shareware3))
  409. (complete 100)
  410. ;
  411.